All Functions Used So Far, Week 7

max

{base}

Get maximum of a vector

str

{utils}

Get the structure of an R object

library

{base}

Load an R package

levels

{base}

Get levels of a factor

c

{base}

Combine values/vectors into a vector

summary

{base}

Obtain summary statistics or detailed regression output

sd

{stats}

Get standard deviation of a vector

setwd

{base}

Set Working Directory

arrange

{dplyr}

Sort values of data frame according to a variable/combination of varaibles

sum

{base}

Get sum of numeric values or a vector

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

ungroup

{dplyr}

Resolve grouping created with “group_by”

filter

{dplyr}

Filter out rows of a data frame according to logical vector

geom_histogram

{GGPLOT2}

Generates a histogram

names

{base}

Retrieve names of a list/vector

cut

{base}

Convert Numeric to Factor

desc

{dplyr}

Arrange in descending order

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

factor

{base}

Create a factor

mean

{base}

Get mean of a vector

labs

{GGPLOT2}

Customise labels in GGPLOT2

boxplot

{graphics}

Plot a simple box plot

hist

{graphics}

Plot a simple histogram

summarise

{dplyr}

collapse the dataset to a summary statistic. Usually used with group_by()

ggplot

{GGPLOT2}

Create a ggplot graph

read_excel

{readxl}

Read an Excel file

recode

{dplyr}

Recode a variable

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

median

{stats}

Get median of a vector

var

{stats}

Calculate variance

ifelse

{base}

Return a or b depending on the value of test

head

{utils}

Show first 5 rows of a data frame

min

{base}

Get minimum of a vector

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

mutate

{dplyr}

Modify/create a column in a data frame

select

{dplyr}

Select columns from a tibble/data frame

range

{base}

Return range of values

slice

{dplyr}

Subset rows using their positions

seq

{base}

Create a sequence

ordered

{dplyr}

Create an ordered factor

The end!